home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / prgtools / langs / gemfst18.lzh / GEMFAST.H < prev    next >
Encoding:
C/C++ Source or Header  |  1992-12-06  |  29.1 KB  |  735 lines

  1. /* tab expansion/compression should be set to 4 */
  2. /**************************************************************************
  3.  * GEMFAST.H - Header file for GEM programming.
  4.  *
  5.  *  This header file contains items compatible with both GEMDEFS and OBDEFS
  6.  *  from the Alcyon system.  Note that there are no 'extern' definitions
  7.  *  for the GEM functions, because they all return a signed int and work
  8.  *  fine as autodefined functions.
  9.  *
  10.  * Maintenance:
  11.  *  02/29/92 - v1.8
  12.  *             > Added new options for new utility functions.
  13.  *             > Added extern declarations for all global vars.
  14.  *             > Added macro to map frm_dsdial() to frm_dsdialog() with
  15.  *               parms in the new order.
  16.  *             > Added macros mapping appl_init/exit to apl_xinit/xexit,
  17.  *               so that all aps automatically get new extended init that
  18.  *               fills in the new global vars.  New utils REQUIRE that
  19.  *               these vars be init'd; think twice before changing this!
  20.  *             > Changed FDADDR datatype from char* to void*.
  21.  *  05/26/90 - v1.4
  22.  *             > Added RSHDR structure for imbedded resource support.
  23.  *             > Fixed all structures which defined pointers as 'long'...
  24.  *               - ICONBLK ib_pmask, ib_pdata, ib_ptext
  25.  *               - BITBLK  bi_pdata
  26.  *               - USERBLK ub_code
  27.  *               - PARMBLK pb_tree
  28.  *               All of these structure elements now define the proper ptr.
  29.  *             > Added AESUTIL_A, AESFAST_A and VDIFAST_A symbols.  This
  30.  *               allows specific indication of the presence or abscence of
  31.  *               the bindings libraries, allowing a programmer to use the
  32.  *               GEMFAST.H header without using the rest of GemFast.  This
  33.  *               also allows conditional compilation code to be more
  34.  *               specific:  it can now test for the presence of the header
  35.  *               file (and handle the differences in the structure defs),
  36.  *               and it can separately test for the presence of the libs,
  37.  *               and the extended functions available therein.
  38.  *  12/03/89 - v1.3
  39.  *             > Renamed a lot of functions, a name compatibility block was
  40.  *               added at the end of this file to smooth the transition.
  41.  *             > Added NO_OBJECT, MU_MENTRY, MU_MEXIT to defines.
  42.  *             > Added XMULTI struct, even though it really belongs to v2.0
  43.  *************************************************************************/
  44.  
  45. #pragma idempotent              /* sozobon: prevent multiple inclusion */
  46.  
  47. #ifndef GEMFAST_H               /* Prevent multiple inclusion */
  48.  
  49. #define GEMFAST_H       1       /* Tell the world GEMFAST header is used */
  50. #define GEMF_VERSION    0x0180  /* Tell the world we are v1.80           */
  51.  
  52. #define AESUTIL_A       1       /* Tell the world AESFAST utils  available */
  53. #define AESFAST_A       1       /* Tell the world AESFAST lib is available */
  54. #define VDIFAST_A       1       /* Tell the world VDIFAST lib is available */
  55.  
  56.                                 /* VDI inside fill styles  */
  57. #define IS_HOLLOW   0
  58. #define IS_SOLID    1
  59. #define IS_PATTERN  2
  60. #define IS_HATCH    3
  61. #define IS_UDPTRN   4
  62.                                 /* VDI inside fill patterns  */
  63. #define IP_HOLLOW   0
  64. #define IP_1PTRN    1
  65. #define IP_2PTRN    2
  66. #define IP_3PTRN    3
  67. #define IP_4PTRN    4
  68. #define IP_5PTRN    5
  69. #define IP_6PTRN    6
  70. #define IP_SOLID    7
  71.                                /* VDI normal graphics drawing modes */
  72. #define MD_REPLACE  1
  73. #define MD_TRANS    2
  74. #define MD_XOR      3
  75. #define MD_ERASE    4
  76.                                /* VDI bit blt rules */
  77. #define ALL_WHITE   0
  78. #define S_AND_D     1
  79. #define S_AND_NOTD  2
  80. #define S_ONLY      3
  81. #define NOTS_AND_D  4
  82. #define D_ONLY      5
  83. #define S_XOR_D     6
  84. #define S_OR_D      7
  85. #define NOT_SORD    8
  86. #define NOT_SXORD   9
  87. #define D_INVERT    10
  88. #define NOT_D       10
  89. #define S_OR_NOTD   11
  90. #define NOT_S       12
  91. #define NOTS_OR_D   13
  92. #define NOT_SANDD   14
  93. #define ALL_BLACK   15
  94.                                     /* font types */
  95. #define IBM         3
  96. #define SMALL       5
  97.                                     /* evnt_multi options */
  98. #define MU_KEYBD    0x0001
  99. #define MU_BUTTON   0x0002
  100. #define MU_M1       0x0004
  101. #define MU_M2       0x0008
  102. #define MU_MESAG    0x0010
  103. #define MU_TIMER    0x0020
  104.                                     /* evnt_mouse options */
  105. #define MU_MENTRY   0x0000
  106. #define MU_MEXIT    0x0001
  107.                                     /* keyboard states */
  108. #define K_RSHIFT    0x0001
  109. #define K_LSHIFT    0x0002
  110. #define K_CTRL      0x0004
  111. #define K_ALT       0x0008
  112.                                     /* event message values */
  113. #define MN_SELECTED 10
  114. #define WM_REDRAW   20
  115. #define WM_TOPPED   21
  116. #define WM_CLOSED   22
  117. #define WM_FULLED   23
  118. #define WM_ARROWED  24
  119. #define WM_HSLID    25
  120. #define WM_VSLID    26
  121. #define WM_SIZED    27
  122. #define WM_MOVED    28
  123. #define WM_NEWTOP   29
  124. #define AC_OPEN     40
  125. #define AC_CLOSE    41
  126.                                     /* form_dial opcodes */
  127. #define FMD_START   0
  128. #define FMD_GROW    1
  129. #define FMD_SHRINK  2
  130. #define FMD_FINISH  3
  131.                                     /* rsrc_gaddr structure types */
  132. #define ROOT        0               /* this name used by MWC */
  133. #define R_TREE      0
  134. #define R_OBJECT    1
  135. #define R_TEDINFO   2
  136. #define R_ICONBLK   3
  137. #define R_BITBLK    4
  138. #define R_STRING    5
  139. #define R_IMAGEDATA 6
  140. #define R_OBSPEC    7
  141. #define R_TEPTEXT   8
  142. #define R_TEPTMPLT  9
  143. #define R_TEPVALID  10
  144. #define R_IBPMASK   11
  145. #define R_IBPDATA   12
  146. #define R_IBPTEXT   13
  147. #define R_BIPDATA   14
  148. #define R_FRSTR     15
  149. #define R_FRIMG     16
  150.                                     /* Window Attributes */
  151. #define NAME        0x0001
  152. #define CLOSER      0x0002
  153. #define FULLER      0x0004
  154. #define MOVER       0x0008
  155. #define INFO        0x0010
  156. #define SIZER       0x0020
  157. #define UPARROW     0x0040
  158. #define DNARROW     0x0080
  159. #define VSLIDE      0x0100
  160. #define LFARROW     0x0200
  161. #define RTARROW     0x0400
  162. #define HSLIDE      0x0800
  163.                                     /* wind_calc options */
  164. #define WC_BORDER   0
  165. #define WC_WORK     1
  166.                                     /* wind_get options */
  167. #define WF_KIND     1
  168. #define WF_NAME     2
  169. #define WF_INFO     3
  170. #define WF_WORKXYWH 4
  171. #define WF_CURRXYWH 5
  172. #define WF_PREVXYWH 6
  173. #define WF_FULLXYWH 7
  174. #define WF_HSLIDE   8
  175. #define WF_VSLIDE   9
  176. #define WF_TOP      10
  177. #define WF_FIRSTXYWH 11
  178. #define WF_NEXTXYWH 12
  179. #define WF_RESVD    13
  180. #define WF_NEWDESK  14
  181. #define WF_HSLSIZE  15
  182. #define WF_VSLSIZE  16
  183. #define WF_SCREEN   17
  184.                                     /* wind_update options */
  185. #define END_UPDATE  0
  186. #define BEG_UPDATE  1
  187. #define END_MCTRL   2
  188. #define BEG_MCTRL   3
  189.                                     /* graf_mouse mouse types*/
  190. #define ARROW           0
  191. #define TEXT_CRSR       1
  192. #define HOURGLASS       2           /* this name used by MWC */
  193. #define BUSYBEE         2           /* because I always forget the underbar */
  194. #define BUSY_BEE        2
  195. #define BEE             2
  196. #define POINT_HAND      3
  197. #define FLAT_HAND       4
  198. #define THIN_CROSS      5
  199. #define THICK_CROSS     6
  200. #define OUTLN_CROSS     7
  201. #define USER_DEF        255
  202. #define M_OFF           256
  203. #define M_ON            257
  204.                                 /* max depth of search or draw  */
  205. #define MAX_DEPTH   8
  206.                                 /* value returned by objc_find(), et. al. */
  207. #define NO_OBJECT   -1
  208.                                 /* object types */
  209. #define G_BOX       20
  210. #define G_TEXT      21
  211. #define G_BOXTEXT   22
  212. #define G_IMAGE     23
  213. #define G_USERDEF   24
  214. #define G_PROGDEF   24
  215. #define G_IBOX      25
  216. #define G_BUTTON    26
  217. #define G_BOXCHAR   27
  218. #define G_STRING    28
  219. #define G_FTEXT     29
  220. #define G_FBOXTEXT  30
  221. #define G_ICON      31
  222. #define G_TITLE     32
  223.                                 /* object options */
  224. #define NONE        0x0000
  225. #define SELECTABLE  0x0001
  226. #define DEFAULT     0x0002
  227. #define EXIT        0x0004
  228. #define EDITABLE    0x0008
  229. #define RBUTTON     0x0010
  230. #define LASTOB      0x0020
  231. #define TOUCHEXIT   0x0040
  232. #define HIDETREE    0x0080
  233. #define INDIRECT    0x0100
  234.                                 /* Object states */
  235. #define NORMAL      0x0000
  236. #define SELECTED    0x0001
  237. #define CROSSED     0x0002
  238. #define CHECKED     0x0004
  239. #define DISABLED    0x0008
  240. #define OUTLINED    0x0010
  241. #define SHADOWED    0x0020
  242.                                 /* Object colors    */
  243. #define WHITE       0
  244. #define BLACK       1
  245. #define RED         2
  246. #define GREEN       3
  247. #define BLUE        4
  248. #define CYAN        5
  249. #define YELLOW      6
  250. #define MAGENTA     7
  251. #define LWHITE      8
  252. #define LBLACK      9
  253. #define LRED        10
  254. #define LGREEN      11
  255. #define LBLUE       12
  256. #define LCYAN       13
  257. #define LYELLOW     14
  258. #define LMAGENTA    15
  259.                                 /* editable text field definitions */
  260. #define EDSTART     0
  261. #define EDINIT      1
  262. #define EDCHAR      2
  263. #define EDEND       3
  264.                                 /* editable text justification */
  265. #define TE_LEFT     0
  266. #define TE_RIGHT    1
  267. #define TE_CNTR     2
  268.  
  269. /*-------------------------------------------------------------------------
  270.  * a few miscellanious GemFast-defined constants...
  271.  *-----------------------------------------------------------------------*/
  272.  
  273. #define GRF_MSALTARROW    200   /* alternate value of ARROW for grf_mouse() */
  274. #define GRF_MSINQUIRE    (-1)   /* inquire current shape for grf_mouse()    */
  275. #define OBJ_BMINQUIRE    (-1)   /* get w/o change from obj_bmbuttons()      */
  276. #define FRM_GETDEFAULTS (-1L)   /* get w/o change from frm_defaults()       */
  277. #define FRM_MOVER      0x4000   /* special ob_flags value for moveable forms*/
  278.  
  279. #define G_THERMO          200   /* ob_type for a thermometer display object */
  280.  
  281. #define OBJ_NODRAW          0   /* obj_XXchange(): no draw after change     */
  282. #define OBJ_WITHDRAW        1   /* obj_XXchange(): do draw after change     */
  283. #define OBJ_CLIPDRAW        2   /* obj_XXchange(): draw with optional clip  */
  284.  
  285. #define OBJ_TINQUIRE  (-32000)  /* inquire current G_THERMO position        */
  286. #define OBJ_TINCREMENT    (-1)  /* increment current G_THERMO position by 1 */
  287.  
  288. #define FRM_DSMAXBUTTONS    5   /* max dynamic button strings               */
  289. #define FRM_DSMAXSTRINGS   20   /* max dynamic dialog display strings       */
  290.  
  291. /*-------------------------------------------------------------------------
  292.  * options for apl_whatever() functions...
  293.  *-----------------------------------------------------------------------*/
  294.  
  295. #define APL_RTRANSIENT      0x0001  /* cleanup transient resources */
  296. #define APL_RPERMENANT      0x0002  /* cleanup permenant resources */
  297.  
  298. /*-------------------------------------------------------------------------
  299.  * actions for frm_desktop()...
  300.  *-----------------------------------------------------------------------*/
  301.  
  302. #define FRM_DTINSTALL   0x00000000L  /* install form as system desktop      */
  303. #define FRM_DTREMOVE    0x10000000L  /* remove form, revert to sys desktop  */
  304.  
  305. /*-------------------------------------------------------------------------
  306.  * actions for frm_dialog()...
  307.  *-----------------------------------------------------------------------*/
  308.  
  309. #define FRM_DSTART      0x10000000L  /* do FMD_START                        */
  310. #define FRM_DDRAW       0x20000000L  /* do objc_draw()                      */
  311. #define FRM_DDO         0x40000000L  /* do form_do()                        */
  312. #define FRM_DFINISH     0x80000000L  /* do FMD_FINISH                       */
  313. #define FRM_DCOMPLETE   0xF0000000L  /* do all the steps above in one call  */
  314.  
  315. /*-------------------------------------------------------------------------
  316.  * actions for frm_progress()...
  317.  *-----------------------------------------------------------------------*/
  318.  
  319. #define FRM_PSTART      0x10000000L  /* set up and display progress dialog  */
  320. #define FRM_PUPDATE     0x40000000L  /* update progress thermometer         */
  321. #define FRM_PFINISH     0x80000000L  /* close and cleanup progress dialog   */
  322.  
  323. /*-------------------------------------------------------------------------
  324.  * options for all frm_whatever() functions...
  325.  *   0xauddbbbb
  326.  *     ||| |______ Basic options for all dialog handling.
  327.  *     |||________ Dynamic dialog options.
  328.  *     ||_________ User options; never touched by GemFast.
  329.  *     |__________ Actions.
  330.  *-----------------------------------------------------------------------*/
  331.  
  332. #define FRM_NORMAL          0x00000000L /* placeholder when you want none   */
  333. #define FRM_EXPLODE         0x00000001L /* exploding box graphics in dialog */
  334. #define FRM_CENTER          0x00000002L /* center dialog in screen          */
  335. #define FRM_NEARMOUSE       0x00000004L /* center dialog over mouse         */
  336. #define FRM_MOUSEARROW      0x00000008L /* force mouse ARROW during dialog  */
  337. #define FRM_USEBLIT         0x00000010L /* use blits instead of redraw msgs */
  338. #define FRM_MOVEABLE        0x00000020L /* dialog is moveable               */
  339. #define FRM_NODEFAULTS      0x00008000L /* these options override defaults  */ 
  340.  
  341. #define FRM_DMUSTSELECT     0x00010000L /* dsdialog/dsmenu: no default exit */
  342. #define FRM_DSHADOWED       0x00020000L /* dsdialog/dsmenu: shadowed parent */
  343.  
  344. #define FRM_DSL1TITLE       0x00100000L /* 1st line is title, higher y pos  */
  345.  
  346. #define FRM_MEXITPARENT     0x00100000L /* exit if mouse leaves parent      */
  347. #define FRM_MEXITVICINITY   0x00200000L /* exit if mouse leaves vicinity    */
  348.  
  349. #define FRM_OPTIONBITS      0x0FFFFFFFL /* mask for dialog options          */
  350. #define FRM_BOPTIONBITS     0x0000FFFFL /* mask for basic options           */
  351. #define FRM_DOPTIONBITS     0x00FF0000L /* mask for dynamic options         */
  352. #define FRM_UOPTIONBITS     0x0F000000L /* mask for user options            */
  353. #define FRM_ACTIONBITS      0xF0000000L /* mask for dialog actions          */
  354.  
  355. /*-------------------------------------------------------------------------
  356.  * option for fsl_dialog()...
  357.  *-----------------------------------------------------------------------*/
  358.  
  359. #define FSL_NORMAL          0x0000
  360. #define FSL_FNOPTIONAL      0x0001
  361. #define FSL_PATHONLY        0x0002
  362.  
  363. /*-------------------------------------------------------------------------
  364.  * options for grf_blit() and grf_memblit()...
  365.  *-----------------------------------------------------------------------*/
  366.  
  367. #define GRF_NORMAL         0x0000  /* a placeholder value                */
  368. #define GRF_BFROMSCREEN    0x1000  /* blit from screen to buffer         */
  369. #define GRF_BTOSCREEN      0x2000  /* blit from buffer to screen         */
  370. #define GRF_BMEMCALC       0x4000  /* calc mem requirements, don't blit  */
  371. #define GRF_BOBJTREE       0x0001  /* rectparm OBJECT* instead of GRECT* */
  372.  
  373. /**************************************************************************
  374.  * data structures and types...
  375.  *************************************************************************/
  376.  
  377. /*-------------------------------------------------------------------------
  378.  * FDB/MFDB structure (describes memory area for VDI blit)...
  379.  *-----------------------------------------------------------------------*/
  380.  
  381. #ifndef FDADDR                  /* v1.3:  this define has been added to  */
  382.   #define FDADDR void*          /* help provide compatibility between    */
  383. #endif                          /* bindings systems.                     */
  384.  
  385. typedef struct fdbstr {
  386.     FDADDR  fd_addr;
  387.     int     fd_w;
  388.     int     fd_h;
  389.     int     fd_wdwidth;
  390.     int     fd_stand;
  391.     int     fd_nplanes;
  392.     int     fd_r1;
  393.     int     fd_r2;
  394.     int     fd_r3;
  395.     } FDB, MFDB;
  396.  
  397. /*-------------------------------------------------------------------------
  398.  * MFORM structure (describes mouse cursor data)...
  399.  *-----------------------------------------------------------------------*/
  400.  
  401. typedef struct mfstr {
  402.     int mf_xhot;
  403.     int mf_yhot;
  404.     int mf_nplanes;
  405.     int mf_fg;
  406.     int mf_bg;
  407.     int mf_mask[16];
  408.     int mf_data[16];
  409.     } MFORM ;
  410.  
  411. /*-------------------------------------------------------------------------
  412.  * OBJECT structure...
  413.  *-----------------------------------------------------------------------*/
  414.  
  415. typedef struct object {
  416.     int             ob_next;        /* -> object's next sibling     */
  417.     int             ob_head;        /* -> head of object's children */
  418.     int             ob_tail;        /* -> tail of object's children */
  419.     unsigned int    ob_type;        /* type of object               */
  420.     unsigned int    ob_flags;       /* options                        */
  421.     unsigned int    ob_state;       /* state                        */
  422.     long            ob_spec;        /* whatever...                  */
  423.     int             ob_x;           /* upper left corner of object  */
  424.     int             ob_y;           /* upper left corner of object  */
  425.     int             ob_width;       /* width of obj                 */
  426.     int             ob_height;      /* height of obj                */
  427.     } OBJECT;
  428.  
  429. /*-------------------------------------------------------------------------
  430.  * GRECT structure (an AES-style rectangle, describes via width/height)...
  431.  *-----------------------------------------------------------------------*/
  432.  
  433. typedef struct grect {
  434.     int g_x;
  435.     int g_y;
  436.     int g_w;
  437.     int g_h;
  438.     } GRECT;
  439.  
  440. /*-------------------------------------------------------------------------
  441.  * VRECT structure (a VDI-style rectangle, describes opposite corners)...
  442.  *-----------------------------------------------------------------------*/
  443.  
  444. typedef struct vrect {
  445.     int v_x1;
  446.     int v_y1;
  447.     int v_x2;
  448.     int v_y2;
  449.     } VRECT;
  450.  
  451. /*-------------------------------------------------------------------------
  452.  * TEDINFO structure...
  453.  *-----------------------------------------------------------------------*/
  454.  
  455. typedef struct text_edinfo {
  456.     char *te_ptext;             /* ptr to text               */
  457.     char *te_ptmplt;            /* ptr to template           */
  458.     char *te_pvalid;            /* ptr to validation chrs.   */
  459.     int  te_font;               /* font                      */
  460.     int  te_junk1;              /* junk word                 */
  461.     int  te_just;               /* justification             */
  462.     int  te_color;              /* color information word    */
  463.     int  te_junk2;              /* junk word                 */
  464.     int  te_thickness;          /* border thickness          */
  465.     int  te_txtlen;             /* length of text string     */
  466.     int  te_tmplen;             /* length of template string */
  467.     } TEDINFO;
  468.  
  469. /*-------------------------------------------------------------------------
  470.  * ICONBLK structure...
  471.  *-----------------------------------------------------------------------*/
  472.  
  473. typedef struct icon_block {
  474.     int  *ib_pmask;
  475.     int  *ib_pdata;
  476.     char *ib_ptext;
  477.     int  ib_char;
  478.     int  ib_xchar;
  479.     int  ib_ychar;
  480.     int  ib_xicon;
  481.     int  ib_yicon;
  482.     int  ib_wicon;
  483.     int  ib_hicon;
  484.     int  ib_xtext;
  485.     int  ib_ytext;
  486.     int  ib_wtext;
  487.     int  ib_htext;
  488.     } ICONBLK;
  489.  
  490. /*-------------------------------------------------------------------------
  491.  * BITBLK structure...
  492.  *-----------------------------------------------------------------------*/
  493.  
  494. typedef struct bit_block {
  495.     int  *bi_pdata;                 /* ptr to bit forms data  */
  496.     int  bi_wb;                     /* width of form in bytes */
  497.     int  bi_hl;                     /* height in lines        */
  498.     int  bi_x;                      /* source x in bit form   */
  499.     int  bi_y;                      /* source y in bit form   */
  500.     int  bi_color;                  /* fg color of blt        */
  501.     } BITBLK;
  502.  
  503. /*-------------------------------------------------------------------------
  504.  * USERBLK/APPLBLK structure (defines a userdraw object)...
  505.  *-----------------------------------------------------------------------*/
  506.  
  507. typedef struct user_blk {
  508.     long (*ub_code)();  /* -> drawfunc, func should return 0             */
  509.     long ub_parm;       /* anything  drawfunc/application wants to store */
  510.     } USERBLK, APPLBLK;
  511.  
  512. #define appl_blk user_blk
  513.  
  514. /*-------------------------------------------------------------------------
  515.  * XUSERBLK (our internal extension to a standard USERBLK)...
  516.  *-----------------------------------------------------------------------*/
  517.  
  518. typedef struct xuser_blk {
  519.     long            (*ub_code)(); /* the 1st two fields are USERBLK std, */
  520.     struct xuser_blk *ub_self;    /* but ub_parm always points to self.  */
  521.     void             *reserved;   /* this will be used in v1.9           */
  522.     long              ub_size;    /* size of this XUSERBLK structure     */
  523.     long              ob_spec;    /* ob_spec and ob_type are from the    */
  524.     short             ob_type;    /* original object before we xformed   */
  525. } XUSERBLK;
  526.  
  527. /*-------------------------------------------------------------------------
  528.  * PARMBLK structure (passed to a userdraw func when drawing an object)...
  529.  *-----------------------------------------------------------------------*/
  530.  
  531. typedef struct parm_blk {
  532.     OBJECT  *pb_tree;
  533.     int     pb_obj;
  534.     int     pb_prevstate;
  535.     int     pb_currstate;
  536.     int     pb_x,  pb_y,  pb_w,  pb_h;
  537.     int     pb_xc, pb_yc, pb_wc, pb_hc;
  538.     long    pb_parm;
  539.     } PARMBLK;
  540.  
  541. /*-------------------------------------------------------------------------
  542.  * XPARMBLK structure (our renaming of a standard PARMBLK)...
  543.  *-----------------------------------------------------------------------*/
  544.  
  545. typedef struct xparm_blk {
  546.     OBJECT   *ptree;
  547.     int       obj;
  548.     int       prevstate;
  549.     int       currstate;
  550.     GRECT     drawrect;
  551.     GRECT     cliprect;
  552.     XUSERBLK *pub;
  553.     } XPARMBLK;
  554.  
  555. /*-------------------------------------------------------------------------
  556.  * RSHDR structure...
  557.  *-----------------------------------------------------------------------*/
  558.  
  559. typedef struct rshdr {
  560.         int             rsh_vrsn;       /* Resource structure version # */
  561.         unsigned int    rsh_object;     /* Offset to first object       */
  562.         unsigned int    rsh_tedinfo;    /* Offset to first tedinfo      */
  563.         unsigned int    rsh_iconblk;    /* Offset to first iconblk      */
  564.         unsigned int    rsh_bitblk;     /* Offset to first bitblk       */
  565.         unsigned int    rsh_frstr;      /* Offset to free string index  */
  566.         unsigned int    rsh_string;     /* Offset to string data        */
  567.         unsigned int    rsh_imdata;     /* Offset to image data         */
  568.         unsigned int    rsh_frimg;      /* Offset to free image index   */
  569.         unsigned int    rsh_trindex;    /* Offset to tree index         */
  570.         unsigned int    rsh_nobs;       /* Number of objects            */
  571.         unsigned int    rsh_ntree;      /* Number object trees          */
  572.         unsigned int    rsh_nted;       /* Number of tedinfo structs    */
  573.         unsigned int    rsh_nib;        /* Number of iconblk structs    */
  574.         unsigned int    rsh_nbb;        /* Number of bitblk structs     */
  575.         unsigned int    rsh_nstring;    /* Number of free strings       */
  576.         unsigned int    rsh_nimages;    /* Number of free images        */
  577.         unsigned int    rsh_rssize;     /* total bytes in resource      */
  578.     } RSHDR;
  579.  
  580. #define RSHDR_DEFINED 1 /* signal to other header files that RSHDR is done */
  581.  
  582. /*-------------------------------------------------------------------------
  583.  * XMOUSE structure...
  584.  *-----------------------------------------------------------------------*/
  585.  
  586. typedef struct xmouse {
  587.     int retval;
  588.     int bclicks;
  589.     int mask;
  590.     int state;
  591.     int status;
  592.     int mousex;
  593.     int mousey;
  594.     int mouseb;
  595.     int keystate;
  596.     } XMOUSE;
  597.  
  598. /*-------------------------------------------------------------------------
  599.  * XMULTI structure...
  600.  *-----------------------------------------------------------------------*/
  601.  
  602. typedef struct xmulti {
  603.     int     msgbuf[8];
  604.     int     mflags,
  605.             mbclicks,
  606.             mbmask,
  607.             mbstate,
  608.             mm1flags;
  609.     GRECT   mm1rect;
  610.     int     mm2flags;
  611.     GRECT   mm2rect;
  612.     int     mtlocount,
  613.             mthicount;
  614.     int     mwhich,
  615.             mmox,
  616.             mmoy,
  617.             mmobutton,
  618.             mmokstate,
  619.             mkreturn,
  620.             mbreturn;
  621. } XMULTI;
  622.  
  623. /**************************************************************************
  624.  * declarations for functions that return something other than an int...
  625.  *************************************************************************/
  626.  
  627. extern void  *apl_malloc();
  628. extern long   frm_defaults();
  629. extern void  *grf_memblit();
  630. extern long   grf_blit();
  631. extern char **obj_ppstring();
  632. extern GRECT *rc_gadjust();
  633. extern VRECT *rc_vadjust();
  634. extern void  *rc_copy();
  635. extern GRECT *rc_vtog();
  636. extern VRECT *rc_gtov();
  637. extern GRECT *rc_union();
  638. extern GRECT *rc_confine();
  639. extern GRECT *rc_scale();
  640.  
  641. extern void  *frm_dovector();   /* these are under construction... */
  642. extern void  *frm_init();       /* don't use them yet.             */
  643.  
  644. /**************************************************************************
  645.  * declarations of all global vars defined by gemfast...
  646.  *************************************************************************/
  647.  
  648. /*
  649.  * these are valid after appl_init()
  650.  */
  651.  
  652. extern void   *aespb[6];        /* the AES parmblk, an array of 6 ptrs    */
  653. extern int     aescontrol[5];   /* the AES control structure, 5 ints      */
  654. extern int     global[];        /* global[] is aliased by following names */
  655. extern int     gl_apversion;    /* the AES version number                 */
  656. extern int     gl_apcount;      /* max # of concurrent AES applications   */
  657. extern int     gl_apid;         /* id of the current application          */
  658. extern long    gl_apprivate;    /* anything the applicaton wants to store */
  659. extern void   *gl_apptree;      /* pointer to array of object tree ptrs   */
  660. extern long    gl_ap1resv;      /* old name for pointer to rsc data       */
  661. extern RSHDR  *gl_aprshdr;      /* pointer to head of rsc data            */
  662. extern int     gl_ap2resv[6];   /* unused entries in global array         */
  663.  
  664. /*
  665.  * these are valid after apl_xinit()
  666.  */
  667.  
  668. extern int     gl_grfhandle;   /* global physical VDI handle (graf_handle)*/
  669. extern int     gl_wchar;       /* width of a character                    */
  670. extern int     gl_hchar;       /* height of a character                   */
  671. extern int     gl_wbox;        /* width of a boxchar                      */
  672. extern int     gl_hbox;        /* height of a boxchar                     */
  673. extern GRECT   gl_rwdesk;      /* coordinates of work area of the desktop */
  674. extern GRECT   gl_rfscrn;      /* coordinates of the full screen          */
  675.  
  676. /*
  677.  * these are valid after apl_vopen()
  678.  */
  679.  
  680. extern int     gl_vwout[57];   /* work_out from v_opnvwk()                */
  681. extern int     gl_vxout[57];   /* work_out from vq_extnd(,1,)             */
  682.  
  683. /**************************************************************************
  684.  * automatically use extended binding routines....
  685.  *   if you undo these macros, all the builtin utilities will break!
  686.  *   the normal low-level bindings will still work, though.
  687.  *************************************************************************/
  688.  
  689. #define appl_init   apl_xinit   /* extended init fills in new gl_ vars    */
  690. #define appl_exit   apl_xexit   /* extended exit closes shared vdi, etc   */
  691. #define wind_update wnd_update  /* stack-like wind_update routine         */
  692. #define graf_mouse  grf_mouse   /* use save/restore mouse shape system    */
  693. #define objc_xywh   obj_xywh    /* this one's just plain faster           */
  694.  
  695. #define menu_bar(a,b)   mnu_bar((a),(b),0L) /* popable menu system        */
  696.  
  697. /**************************************************************************
  698.  * Name compatibility stuff.
  699.  *
  700.  *  02/29/92 - v1.8
  701.  *              Added mapping of frm_dsdial to frm_dsdialog.
  702.  *  05/26/90 - v1.4
  703.  *              Added mapping of find_exttype to obj_xtfind.
  704.  *  08/28/89 - v1.3
  705.  *              In v1.3, a big push has been made to make a consistant
  706.  *              naming standard for the AES utilities.  To avoid breaking
  707.  *              a lot of existing code, the following block will direct
  708.  *              the old names to the new routines.
  709.  *************************************************************************/
  710.  
  711. #define objclg_adjust           rc_gadjust
  712. #define objclv_adjust           rc_vadjust
  713. #define objcl_calc              obj_clcalc
  714.  
  715. #define objrb_which(a,b)        obj_rbfind((a),(b),SELECTED)
  716. #define obj_rbwhich(a,b)        obj_rbfind((a),(b),SELECTED)
  717. #define objxrb_which            obj_rbfind
  718.  
  719. #define find_exttype            obj_xtfind
  720.  
  721. #define objst_change            obj_stchange
  722. #define objfl_change            obj_flchange
  723.  
  724. #define graqon_mouse            gra_qonmouse
  725. #define graqof_mouse            gra_qofmouse
  726. #define graq_mstate             gra_qmstate
  727.  
  728. #define frm_dsdial(str,btn, options) frm_dsdialog((options)|FRM_DSL1TITLE,(btn),(str))
  729. #define frm_sizes(tree, rect)      obj_clcalc((tree), ROOT, (rect), NULL)
  730.  
  731. #endif
  732.  
  733. /*  end of GEMFAST.H */
  734.  
  735.